﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TM.Data.Contracts;
using TM.DataAccessor;
using TM.ExceptionManager;

namespace TM.Data
{
    public class IoCParams : IIoCParams
    {
        private IDataAccessor _dataAccessor;
        private ITMExceptionHandler _exceptionHandler;
        private IUnitOfWork _unitOfWork;

        public IoCParams()
        {
            _dataAccessor = new SQLiteDataAccessor();
            _exceptionHandler = new TMExceptionHandler(true, false, @"Logs\logdata.txt");
            _unitOfWork = new TMUnitofWork(this);
        }
        #region Implementation of IIoCParams

        public IDataAccessor DataAccessor { get { return _dataAccessor; } }
        public ITMExceptionHandler ExceptionHandler { get { return _exceptionHandler; } }
        public IUnitOfWork UnitOfWork { get { return _unitOfWork; } }

        #endregion
    }
}
